<template>
    <div class="page">
        <div class="btn-box clear-float">
            <div class="btn-item">全部（2345）</div>
            <div class="btn-item"><img src="../../assets/icon-add-min.svg">发布简历</div>
            <div class="btn-item"><img src="../../assets/icon-filter.png">筛选</div>
        </div>
        <swiper :options="imgs" height="200"/>
        <personnel-item v-for="(item, key) in workplaceList" :key="key" :data="item" label-color="#333" @onclick="hdandleItemClick(item.id)"/>
    </div>
</template>

<style lang="less" scoped>
    .page{
        .btn-box{
            .btn-item{
                width: 12.5rem;
                float: left;
                line-height: 3.3rem;
                font-size: 1.1rem;
                text-align: center;

                img{
                    height: 1rem;
                    vertical-align: bottom;
                    margin: 1.15rem .4rem;
                }
            }
        }
    }
</style>

<script>
    export default {
        data(){

            const imgs = [
                {
                    src: 'https://img.yzcdn.cn/public_files/2017/10/24/e5a5a02309a41f9f5def56684808d9ae.jpeg',
                    to: '/same'
                },
                'https://img.yzcdn.cn/public_files/2017/10/24/1791ba14088f9c2be8c610d0a6cc0f93.jpeg'
            ];

            const workplaceList = Array(4).fill({
                name: '孙女士',
                intention: '意向职位：信用研究',
                education: '博士',
                experience: '8年',
                expect: '40万-60万',
                date: '2018-09-09',
                setUp: true
            });

            return {
                imgs,
                workplaceList
            }
        },
        methods: {
            hdandleItemClick(id='id'){
                this.$router.push('/workplace/personnelDetail?id=' + id);
            }
        },
    }
</script>